﻿#region Copyright (C) Sector7 Software Studio. All rights reserved
/*******************************************************************************************
 * Creation
 *      Author:         Wolf Lai
 *      Date:           2013/9/4 星期三 20:01:31
 *      Version:        
 * Modification 
 *      Author: 
 *      Date: 
 *      Description: 
 *      Version:
 *******************************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using Sector7.Framework.Core;
using Sector7.Framework.Enums;

namespace Sector7.Medical.EntityType
{
    /// <summary>
    /// 药品规格实体类
    /// </summary>
    [Serializable()]
    [DataContract]
    public class M7_DrugSpec : EntityBase
    {
        /***********************************************************************
         * SPEC < PACK_SPEC < STOCK_SPEC
         * eg.
         * 0.25 克/片，24 片/盒，50 盒/箱
         ***********************************************************************/

        #region DBField

        /// <summary>
        /// 获取或设置规格编码
        /// </summary>
        [DataMember]
        [DBField(DBFieldType.PrimaryKey)]
        public long SpecId { get; set; }

        /// <summary>
        /// 获取或设置药品编码
        /// </summary>
        [DataMember]
        [DBField]
        public long DrugId { get; set; }

        /// <summary>
        /// 获取或设置使用单位编码
        /// </summary>
        [DataMember]
        [DBField]
        public int UsageUnitId { get; set; }

        /// <summary>
        /// 获取或设置包装规格
        /// </summary>
        [DataMember]
        [DBField]
        public decimal PackSpec { get; set; }

        /// <summary>
        /// 获取或设置包装单位编码
        /// </summary>
        [DataMember]
        [DBField]
        public int PackUnitId { get; set; }

        /// <summary>
        /// 获取或设置库存规格
        /// </summary>
        [DataMember]
        [DBField]
        public decimal StockSpec { get; set; }

        /// <summary>
        /// 获取或设置库存单位编码
        /// </summary>
        [DataMember]
        [DBField]
        public int StockUnitId { get; set; }

        #endregion

        #region Extension

        /// <summary>
        /// 获取或设置使用单位
        /// </summary>
        [DataMember]
        public M7_Unit UsageUnit { get; set; }

        /// <summary>
        /// 获取或设置包装单位
        /// </summary>
        [DataMember]
        public M7_Unit PackUnit { get; set; }

        /// <summary>
        /// 获取或设置库存单位
        /// </summary>
        [DataMember]
        public M7_Unit StockUnit { get; set; }

        /// <summary>
        /// 获取货设置药品价格
        /// </summary>
        [DataMember]
        public M7_DrugPrice Price { get; set; }

        #endregion
    }
}